package myJs.myPkg

import jsext._

import scala.scalajs.js
import scala.language.implicitConversions
import scala.scalajs.js.JSConverters._
import jquery.JQuery


/**
 * Created by yz on 2019/3/14
 */
@js.native
trait TreeGridJQuery extends js.Object {

  def treegrid(options:TreeGridOptions): JQuery = scalajs.js.native

}

object TreeGridOptions extends TreeGridOptionsBuilder(noOpts)

class TreeGridOptionsBuilder(val dict: OptMap) extends JSOptionBuilder[TreeGridOptions, TreeGridOptionsBuilder](new TreeGridOptionsBuilder(_)) {

  def treeColumn(v: Int) = jsOpt("treeColumn", v)

  def onChange(v: js.Function) = jsOpt("onChange", v)

}

trait TreeGridOptions extends js.Object {

}

trait TreeGridJQueryImplicits {
  implicit def implicitTreeGridJQuery(jq: JQuery): TreeGridJQuery = {
    jq.asInstanceOf[TreeGridJQuery]
  }
}
